<?php

/**
 * Program filter form.
 *
 * @package    sf_sandbox
 * @subpackage filter
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormFilterTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class ProgramReportFormFilter extends ProgramFormFilter {

    public function configure() {

        $arr = array_merge(array('' => 'Select Program Code'), ProgramTable::getInstance()->getUniqeCode());
        $this->widgetSchema['program_code'] = new sfWidgetFormChoice(array('choices' => $arr));
        $this->validatorSchema['program_code'] = new sfValidatorChoice(array('required' => false, 'choices' => array_keys($arr)));

        $this->useFields(array('program_code'));

        $this->widgetSchema->setNameFormat('program_filters[%s]');
    }

    public function getFields() {
        return array('program_code' => 'ForeignKey');
    }

}
